<template>
  <div>
    <a-row class="head">
      <a-icon type="left" @click="$emit('back')" v-if="backLock" />
      <div class="left2" style="cursor:pointer;" v-if="backLock" @click="$emit('back')">
        {{ subTitle }}
        <slot name="subTitle"></slot>
      </div>
      <slot></slot>
    </a-row>
  </div>
</template>

<script>
export default {
  name: "PageHeader",
  props: {
    subTitle: {
      type: String,
      default: ""
    },
    backLock: {
      type: Boolean,
      default: true
    }
  }
};
</script>

<style lang="scss" scoped>
.head {
  background-color: #fff;
  .anticon-left {
    z-index: 3;
    left: 24px;
    position: absolute;
    color: #595959;
    font-size: 20px;
    margin-top: 20px;
  }
  .left2 {
    z-index: 3;
    left: 50px;
    position: absolute;
    color: #595959;
    font-size: 16px;
  }
  font-size: 16px;
  color: #000;
  font-weight: 500;
  text-align: center;
  line-height: 60px;
  height: 60px;
  border-bottom: 1px solid #e8e8e8;
}
</style>
